/*
 * Powered By [ERP]
 * Since 2014 - 2016
 */

package io.renren.entity;

import javax.validation.constraints.NotNull;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.hibernate.validator.constraints.Length;
/**
 * @author smn email:shimengnan007@163.com
 * @version 1.0
 * @since 1.0
 */


public class User implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "User";
	public static final String ALIAS_ID = "主键";
	public static final String ALIAS_NUMBER = "用户名";
	public static final String ALIAS_NAME = "用户实称";
	public static final String ALIAS_STATUS = "状态";
	public static final String ALIAS_CREATERID = "创建人";
	public static final String ALIAS_CREATTIME = "创建时间";
	public static final String ALIAS_LASTMODIFIERID = "最后修改人";
	public static final String ALIAS_LASTMODIFYTIME = "最后修改时间";
	public static final String ALIAS_MAINORGID = "主组织";
	public static final String ALIAS_CORPID = "公司";
	public static final String ALIAS_BUSIDATE = "业务日期";
	public static final String ALIAS_REMARK = "备注";
	public static final String ALIAS_ISSEALUP = "是否封存[是为1,否为0]";
	public static final String ALIAS_ISCONTROLED = "是否受控[是为1,否为0]";
	public static final String ALIAS_TYPE = "用户类型[10:系统用户 20:职员 30:客户 40:供应商 50:其他 60:认证管理员 70:审计管理员]";
	public static final String ALIAS_PASSWORD = "密码";
	public static final String ALIAS_ISLOCKED = "是否锁定[是为1,否为0]";
	public static final String ALIAS_FORBIDDEN = "是否禁用";
	public static final String ALIAS_EFFECTIVE_DATE = "生效时间";
	public static final String ALIAS_INVALIDATION_DATE = "失效时间";
	public static final String ALIAS_ERR_COUNT = "登录错误次数";
	public static final String ALIAS_GROUP_ID = "所属用户组";
	public static final String ALIAS_PERSON_ID = "对应的操作人";
	public static final String ALIAS_LOCKED_TIME = "用户锁定时间";
	public static final String ALIAS_DEF_ORG_UNIT_ID = "缺省组织";
	public static final String ALIAS_MAIN_ROLE_ID = "主角色";
	public static final String ALIAS_PWD_HIS_STR = "历史密码";
	public static final String ALIAS_EMAIL = "电子邮件";
	public static final String ALIAS_HOME_PHONE = "家庭电话";
	public static final String ALIAS_OFFICE_PHONE = "办公室电话";
	public static final String ALIAS_BACKUP_EMAIL = "备用电子邮件 ";
	public static final String ALIAS_CELL = "手机号码";
	public static final String ALIAS_CUSTOMER_ID = "客户id";
	public static final String ALIAS_SUPPLIER_ID = "供应商id";
	public static final String ALIAS_VDEF1 = "自定义1";
	public static final String ALIAS_VDEF2 = "自定义2";
	public static final String ALIAS_VDEF3 = "自定义3";
	public static final String ALIAS_VDEF4 = "自定义4";
	public static final String ALIAS_VDEF5 = "自定义5";
	public static final String ALIAS_VDEF6 = "自定义6";
	public static final String ALIAS_VDEF7 = "自定义7";
	public static final String ALIAS_VDEF8 = "自定义8";
	public static final String ALIAS_VDEF9 = "自定义9";
	public static final String ALIAS_VDEF10 = "自定义10";
	public static final String ALIAS_ISDELETED = "删除标志";
	public static final String ALIAS_TS = "时间戳";
	
	//date formats
	
	
	//columns START
    /** 主键       db_column: id */	
	@Length(max=32)
	private java.lang.String id;
    /** 用户名       db_column: number */	
	@Length(max=80)
	private java.lang.String number;
    /** 用户实称       db_column: name */	
	@Length(max=255)
	private java.lang.String name;
    /** 状态       db_column: status */	
	
	private java.lang.Integer status;
    /** 创建人       db_column: createrid */	
	@Length(max=32)
	private java.lang.String createrid;
    /** 创建时间       db_column: creattime */	
	
	private java.util.Date creattime;
    /** 最后修改人       db_column: lastmodifierid */	
	@Length(max=32)
	private java.lang.String lastmodifierid;
    /** 最后修改时间       db_column: lastmodifytime */	
	
	private java.util.Date lastmodifytime;
    /** 主组织       db_column: mainorgid */	
	@Length(max=32)
	private java.lang.String mainorgid;
    /** 公司       db_column: corpid */	
	@Length(max=32)
	private java.lang.String corpid;
    /** 业务日期       db_column: busidate */	
	
	private java.util.Date busidate;
    /** 备注       db_column: remark */	
	@Length(max=255)
	private java.lang.String remark;
    /** 是否封存[是为1,否为0]       db_column: issealup */	
	
	private java.lang.Integer issealup;
    /** 是否受控[是为1,否为0]       db_column: iscontroled */	
	
	private java.lang.Integer iscontroled;
	/** 用户类型[10:系统用户 20:职员 30:客户 40:供应商 50:其他 60:认证管理员 70:审计管理员 80: 数据管理员 ]      db_column: type*/
	private java.lang.Integer type;
    /** 密码       db_column: password */	
	@Length(max=255)
	private java.lang.String password;
    /** 是否锁定[是为1,否为0]       db_column: islocked */	
	
	private java.lang.Integer islocked;
    /** 是否禁用       db_column: forbidden */	
	
	private java.lang.Integer forbidden;
    /** 生效时间       db_column: effectiveDate */	
	
	private java.util.Date effectiveDate;
    /** 失效时间       db_column: invalidationDate */	
	
	private java.util.Date invalidationDate;
    /** 登录错误次数       db_column: errCount */	
	
	private java.lang.Integer errCount;
    /** 所属用户组       db_column: groupID */	
	@Length(max=32)
	private java.lang.String groupId;
    /** 对应的操作人       db_column: personId */	
	@Length(max=32)
	private java.lang.String personId;
    /** 用户锁定时间       db_column: lockedTime */	
	
	private java.util.Date lockedTime;
    /** 缺省组织       db_column: defOrgUnitID */	
	@Length(max=32)
	private java.lang.String defOrgUnitId;
    /** 主角色       db_column: mainRoleID */	
	@Length(max=32)
	private java.lang.String mainRoleId;
    /** 历史密码       db_column: pwdHisStr */	
	@Length(max=255)
	private java.lang.String pwdHisStr;
    /** 电子邮件       db_column: eMail */	
	@Length(max=255)
	private java.lang.String email;
    /** 家庭电话       db_column: homePhone */	
	@Length(max=255)
	private java.lang.String homePhone;
    /** 办公室电话       db_column: officePhone */	
	@Length(max=255)
	private java.lang.String officePhone;
    /** 备用电子邮件        db_column: backupEMail */	
	@Length(max=255)
	private java.lang.String backupEmail;
    /** 手机号码       db_column: cell */	
	@Length(max=255)
	private java.lang.String cell;
    /** 客户id       db_column: customerID */	
	@Length(max=255)
	private java.lang.String customerId;
    /** 供应商id       db_column: supplierID */	
	@Length(max=255)
	private java.lang.String supplierId;
    /** 自定义1       db_column: vdef1 */	
	@Length(max=255)
	private java.lang.String vdef1;
    /** 自定义2       db_column: vdef2 */	
	@Length(max=255)
	private java.lang.String vdef2;
    /** 自定义3       db_column: vdef3 */	
	@Length(max=255)
	private java.lang.String vdef3;
    /** 自定义4       db_column: vdef4 */	
	@Length(max=255)
	private java.lang.String vdef4;
    /** 自定义5       db_column: vdef5 */	
	@Length(max=255)
	private java.lang.String vdef5;
    /** 自定义6       db_column: vdef6 */	
	@Length(max=255)
	private java.lang.String vdef6;
    /** 自定义7       db_column: vdef7 */	
	@Length(max=255)
	private java.lang.String vdef7;
    /** 自定义8       db_column: vdef8 */	
	@Length(max=255)
	private java.lang.String vdef8;
    /** 自定义9       db_column: vdef9 */	
	@Length(max=255)
	private java.lang.String vdef9;
    /** 自定义10       db_column: vdef10 */	
	@Length(max=255)
	private java.lang.String vdef10;
    /** 删除标志       db_column: isdeleted */	
	
	private java.lang.Integer isdeleted;
    /** 时间戳       db_column: ts */	
	@NotNull 
	private java.util.Date ts;
	private String claid;
	private String basepersonid;	
	
	private Integer colorStatus;
	private String headImageUrl;
	
	public String getBasepersonid() {
		return basepersonid;
	}

	public void setBasepersonid(String basepersonid) {
		this.basepersonid = basepersonid;
	}

	public String getClaid() {
		return claid;
	}

	public void setClaid(String claid) {
		this.claid = claid;
	}
	//columns END

	public User(){
	}

	public User(
		java.lang.String id
	){
		this.id = id;
	}

	public void setId(java.lang.String value) {
		this.id = value;
	}
	
	public java.lang.String getId() {
		return this.id;
	}
	public void setNumber(java.lang.String value) {
		this.number = value;
	}
	
	public java.lang.String getNumber() {
		return this.number;
	}
	public void setName(java.lang.String value) {
		this.name = value;
	}
	
	public java.lang.String getName() {
		return this.name;
	}
	public void setStatus(java.lang.Integer value) {
		this.status = value;
	}
	
	public java.lang.Integer getStatus() {
		return this.status;
	}
	public void setCreaterid(java.lang.String value) {
		this.createrid = value;
	}
	
	public java.lang.String getCreaterid() {
		return this.createrid;
	}	
	public void setCreattime(java.util.Date value) {
		this.creattime = value;
	}
	
	public java.util.Date getCreattime() {
		return this.creattime;
	}
	public void setLastmodifierid(java.lang.String value) {
		this.lastmodifierid = value;
	}
	
	public java.lang.String getLastmodifierid() {
		return this.lastmodifierid;
	}
	
	public void setLastmodifytime(java.util.Date value) {
		this.lastmodifytime = value;
	}
	
	public java.util.Date getLastmodifytime() {
		return this.lastmodifytime;
	}
	public void setMainorgid(java.lang.String value) {
		this.mainorgid = value;
	}
	
	public java.lang.String getMainorgid() {
		return this.mainorgid;
	}
	public void setCorpid(java.lang.String value) {
		this.corpid = value;
	}
	
	public java.lang.String getCorpid() {
		return this.corpid;
	}
	
	
	public void setBusidate(java.util.Date value) {
		this.busidate = value;
	}
	
	public java.util.Date getBusidate() {
		return this.busidate;
	}
	public void setRemark(java.lang.String value) {
		this.remark = value;
	}
	
	public java.lang.String getRemark() {
		return this.remark;
	}
	public void setIssealup(java.lang.Integer value) {
		this.issealup = value;
	}
	
	public java.lang.Integer getIssealup() {
		return this.issealup;
	}
	public void setIscontroled(java.lang.Integer value) {
		this.iscontroled = value;
	}
	
	public java.lang.Integer getIscontroled() {
		return this.iscontroled;
	}
	public void setType(java.lang.Integer value) {
		this.type = value;
	}
	
	public java.lang.Integer getType() {
		return this.type;
	}
	public void setPassword(java.lang.String value) {
		this.password = value;
	}
	
	public java.lang.String getPassword() {
		return this.password;
	}
	public void setIslocked(java.lang.Integer value) {
		this.islocked = value;
	}
	
	public java.lang.Integer getIslocked() {
		return this.islocked;
	}
	public void setForbidden(java.lang.Integer value) {
		this.forbidden = value;
	}
	
	public java.lang.Integer getForbidden() {
		return this.forbidden;
	}

	
	public void setEffectiveDate(java.util.Date value) {
		this.effectiveDate = value;
	}
	
	public java.util.Date getEffectiveDate() {
		return this.effectiveDate;
	}
	
	
	public void setInvalidationDate(java.util.Date value) {
		this.invalidationDate = value;
	}
	
	public java.util.Date getInvalidationDate() {
		return this.invalidationDate;
	}
	public void setErrCount(java.lang.Integer value) {
		this.errCount = value;
	}
	
	public java.lang.Integer getErrCount() {
		return this.errCount;
	}
	public void setGroupId(java.lang.String value) {
		this.groupId = value;
	}
	
	public java.lang.String getGroupId() {
		return this.groupId;
	}
	public void setPersonId(java.lang.String value) {
		this.personId = value;
	}
	
	public java.lang.String getPersonId() {
		return this.personId;
	}
	
	
	public void setLockedTime(java.util.Date value) {
		this.lockedTime = value;
	}
	
	public java.util.Date getLockedTime() {
		return this.lockedTime;
	}
	public void setDefOrgUnitId(java.lang.String value) {
		this.defOrgUnitId = value;
	}
	
	public java.lang.String getDefOrgUnitId() {
		return this.defOrgUnitId;
	}
	public void setMainRoleId(java.lang.String value) {
		this.mainRoleId = value;
	}
	
	public java.lang.String getMainRoleId() {
		return this.mainRoleId;
	}
	public void setPwdHisStr(java.lang.String value) {
		this.pwdHisStr = value;
	}
	
	public java.lang.String getPwdHisStr() {
		return this.pwdHisStr;
	}
	public void setEmail(java.lang.String value) {
		this.email = value;
	}
	
	public java.lang.String getEmail() {
		return this.email;
	}
	public void setHomePhone(java.lang.String value) {
		this.homePhone = value;
	}
	
	public java.lang.String getHomePhone() {
		return this.homePhone;
	}
	public void setOfficePhone(java.lang.String value) {
		this.officePhone = value;
	}
	
	public java.lang.String getOfficePhone() {
		return this.officePhone;
	}
	public void setBackupEmail(java.lang.String value) {
		this.backupEmail = value;
	}
	
	public java.lang.String getBackupEmail() {
		return this.backupEmail;
	}
	public void setCell(java.lang.String value) {
		this.cell = value;
	}
	
	public java.lang.String getCell() {
		return this.cell;
	}
	public void setCustomerId(java.lang.String value) {
		this.customerId = value;
	}
	
	public java.lang.String getCustomerId() {
		return this.customerId;
	}
	public void setSupplierId(java.lang.String value) {
		this.supplierId = value;
	}
	
	public java.lang.String getSupplierId() {
		return this.supplierId;
	}
	public void setVdef1(java.lang.String value) {
		this.vdef1 = value;
	}
	
	public java.lang.String getVdef1() {
		return this.vdef1;
	}
	public void setVdef2(java.lang.String value) {
		this.vdef2 = value;
	}
	
	public java.lang.String getVdef2() {
		return this.vdef2;
	}
	public void setVdef3(java.lang.String value) {
		this.vdef3 = value;
	}
	
	public java.lang.String getVdef3() {
		return this.vdef3;
	}
	public void setVdef4(java.lang.String value) {
		this.vdef4 = value;
	}
	
	public java.lang.String getVdef4() {
		return this.vdef4;
	}
	public void setVdef5(java.lang.String value) {
		this.vdef5 = value;
	}
	
	public java.lang.String getVdef5() {
		return this.vdef5;
	}
	public void setVdef6(java.lang.String value) {
		this.vdef6 = value;
	}
	
	public java.lang.String getVdef6() {
		return this.vdef6;
	}
	public void setVdef7(java.lang.String value) {
		this.vdef7 = value;
	}
	
	public java.lang.String getVdef7() {
		return this.vdef7;
	}
	public void setVdef8(java.lang.String value) {
		this.vdef8 = value;
	}
	
	public java.lang.String getVdef8() {
		return this.vdef8;
	}
	public void setVdef9(java.lang.String value) {
		this.vdef9 = value;
	}
	
	public java.lang.String getVdef9() {
		return this.vdef9;
	}
	public void setVdef10(java.lang.String value) {
		this.vdef10 = value;
	}
	
	public java.lang.String getVdef10() {
		return this.vdef10;
	}
	public void setIsdeleted(java.lang.Integer value) {
		this.isdeleted = value;
	}
	
	public java.lang.Integer getIsdeleted() {
		return this.isdeleted;
	}
	
	
	public void setTs(java.util.Date value) {
		this.ts = value;
	}
	
	public java.util.Date getTs() {
		return this.ts;
	}
	
	public Integer getColorStatus() {
		return colorStatus;
	}

	public void setColorStatus(Integer colorStatus) {
		this.colorStatus = colorStatus;
	}

	public String getHeadImageUrl() {
		return headImageUrl;
	}

	public void setHeadImageUrl(String headImageUrl) {
		this.headImageUrl = headImageUrl;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("Number",getNumber())
			.append("Name",getName())
			.append("Status",getStatus())
			.append("Createrid",getCreaterid())
			.append("Creattime",getCreattime())
			.append("Lastmodifierid",getLastmodifierid())
			.append("Lastmodifytime",getLastmodifytime())
			.append("Mainorgid",getMainorgid())
			.append("Corpid",getCorpid())
			.append("Busidate",getBusidate())
			.append("Remark",getRemark())
			.append("Issealup",getIssealup())
			.append("Iscontroled",getIscontroled())
			.append("Type",getType())
			.append("Password",getPassword())
			.append("Islocked",getIslocked())
			.append("Forbidden",getForbidden())
			.append("EffectiveDate",getEffectiveDate())
			.append("InvalidationDate",getInvalidationDate())
			.append("ErrCount",getErrCount())
			.append("GroupId",getGroupId())
			.append("PersonId",getPersonId())
			.append("LockedTime",getLockedTime())
			.append("DefOrgUnitId",getDefOrgUnitId())
			.append("MainRoleId",getMainRoleId())
			.append("PwdHisStr",getPwdHisStr())
			.append("Email",getEmail())
			.append("HomePhone",getHomePhone())
			.append("OfficePhone",getOfficePhone())
			.append("BackupEmail",getBackupEmail())
			.append("Cell",getCell())
			.append("CustomerId",getCustomerId())
			.append("SupplierId",getSupplierId())
			.append("Vdef1",getVdef1())
			.append("Vdef2",getVdef2())
			.append("Vdef3",getVdef3())
			.append("Vdef4",getVdef4())
			.append("Vdef5",getVdef5())
			.append("Vdef6",getVdef6())
			.append("Vdef7",getVdef7())
			.append("Vdef8",getVdef8())
			.append("Vdef9",getVdef9())
			.append("Vdef10",getVdef10())
			.append("Isdeleted",getIsdeleted())
			.append("Ts",getTs())
			.append("Claid",getClaid())
			.append("Basepersonid",getBasepersonid())
			.append("ColorStatus",getColorStatus())
			.append("HeadImageUrl",getHeadImageUrl())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof User == false) return false;
		if(this == obj) return true;
		User other = (User)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

